package cn.jiangxiong.pethome.system.dept.domain;

import cn.jiangxiong.pethome.base.domain.BaseDomain;
import cn.jiangxiong.pethome.system.user.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
   /* @ApiParam(name = "ID属性", required = true)//由于Controller类里使用了 @PathVariable注释在测试中无法显示，当 @PathVariable注释取消后在测试时返回数据不是JSON
    private Long id;*/
    @ApiParam(name = "部门编号属性", required = true)
    private String sn;
    @ApiParam(name = "部门名称属性", required = true)
    private String name;
    @ApiParam(name = "dirPath属性", required = true)
    private String dirPath;
    @ApiParam(name = "启用属性", required = true)
    private Integer state;
    @ApiParam(name = "管理ID属性", required = true)
    private Long manager_id;
    @ApiParam(name = "上级ID属性", required = true)
    private Long parent_id;
    @ApiParam(name = "门店ID属性", required = true)
    private Long shop_id;

    //关联查询
    private Employee manager;
    private Department parent;


    //children 不能写错 因为element要使用
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList();

}
